package com.qiguliuxing.dts.db.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.qiguliuxing.dts.db.mybatisHandler.JsonIntegerArrayTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@Builder
@TableName(value = "dts_admin", autoResultMap = true, keepGlobalPrefix = true)
@NoArgsConstructor
@AllArgsConstructor
public class DtsAdmin {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String username;

    private String password;

    private String lastLoginIp;

    @TableField(value = "last_login_time")
    private Date lastLoginTime;

    private String avatar;

    @TableField(value = "add_time")
    private Date addTime;

    @TableField(value = "update_time")
    private Date updateTime;

    private Boolean deleted;

   @TableField(value = "role_ids", typeHandler = JsonIntegerArrayTypeHandler.class)
    private Integer[] roleIds;

    @TableField("`desc`")
    private String desc;

    private String tel;

    private String mail;
}